﻿@using SCMS.Resource
@model SCMS.UI.Models.UCountryProgramme
@{AjaxOptions ajaxOpts = new AjaxOptions
  {
      UpdateTargetId = "ContentDiv",
      LoadingElementId = "loading",
      HttpMethod = "Post",
      Url = Url.Action("CreateEdit"),
      OnSuccess = "CloseDialog();usermsg('" + Resources.Global_String_ProcessCompleted + "');if (document.getElementById('table') != null) {initSorter();sorter.size(20);}"
  };
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


@using (Ajax.BeginForm(null, null, ajaxOpts, new { @class = "form" }))
{
    @Html.ValidationSummary(true)
    <table>
        <tr>
            <td align="right">@Resources.Global_String_Name<font color="red">*</font>:</td>
            <td>
                @Html.EditorFor(model => model.ProgrammeName)<br />
                @Html.ValidationMessageFor(model => model.ProgrammeName, Resources.Global_String_Required)
                @Html.HiddenFor(model => model.Id)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_ShortName<font color="red">*</font>:</td>
            <td>
                @Html.EditorFor(model => model.ShortName)<br />
                @Html.ValidationMessageFor(model => model.ShortName, Resources.Global_String_Required)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_AdministratorEmail:</td>
            <td>
                @Html.EditorFor(model => model._CountryProgramme.AdministratorEmail)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_Country<font color="red">*</font>:</td>
            <td>
                @Html.DropDownListFor(model => model.CountryId, Model.CountrySelect, Resources.Global_String_PleaseSelect)<br />
                @Html.ValidationMessageFor(model => model.CountryId, Resources.Global_String_Required)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_PrimaryPhone<font color="red">*</font>:</td>
            <td>
                @Html.EditorFor(model => model.PrimaryPhone)<br />
                @Html.ValidationMessageFor(model => model.PrimaryPhone)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_SecondaryPhone:</td>
            <td>
                @Html.EditorFor(model => model.SecondaryPhone)<br />
                @Html.ValidationMessageFor(model => model.SecondaryPhone)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_Fax:</td>
            <td>
                @Html.EditorFor(model => model.Fax)<br />
                @Html.ValidationMessageFor(model => model.Fax)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_Email:</td>
            <td>
                @Html.EditorFor(model => model.Email)<br />
                @Html.ValidationMessageFor(model => model.Email)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_MasterBudgetCurrency<font color="red">*</font>:</td>
            <td>
                @Html.DropDownListFor(model => model.MBCurrencyId, Model.CurrencySelect, Resources.Global_String_PleaseSelect)<br />
                @Html.ValidationMessageFor(model => model.MBCurrencyId, Resources.Global_String_Required)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_URL:</td>
            <td>
                @Html.EditorFor(model => model.WebAddress)<br />
                @Html.ValidationMessageFor(model => model.WebAddress)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_Address:</td>
            <td>
                @Html.TextAreaFor(model => model.Address)<br />
                @Html.ValidationMessageFor(model => model.Address)
            </td>
        </tr>
        <tr>
            <td align="right">@Resources.Global_String_Logo:</td>
            <td>
                <div id="fineUploaderElementId">
                    <noscript>
                        <p>@Resources.Global_String_NoJavascriptMessage</p>
                    </noscript>
                </div>
                @Html.HiddenFor(m => m._CountryProgramme.Logo)
            </td>
        </tr>
        <tr>
            <td align="right">&nbsp;</td>
            <td>
                <input type="submit" class="btn green" value="@Resources.Global_String_Save" />
            </td>
        </tr>
    </table>
}
